package com.atguigu.gmall.weball.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

/**
 * @author lfy
 * @Description
 * @create 2023-08-28 14:06
 */
@RestController  //单例
public class HelloController {


    List<byte[]> data = new ArrayList<>();

    @ResponseBody
    @GetMapping("/hello/test")
    public String hello(){
//        byte[] b = new byte[1024*1024];
        //每个请求消耗1mb内存
//        data.add(b);\
        System.out.println("请求进来..");
//        try {
//            Thread.sleep(10000000);
//        } catch (InterruptedException e) {
//            throw new RuntimeException(e);
//        }



        return "ok";
    }
}
